package sws;
public class Main {


	/**
	 * @param args
	 * @throws NoDataAvailableException 
	 * @throws InaccessibleDeviceException 
	 * @throws InterruptedException 
	 */
	public static void main(String[] args) throws InterruptedException {
		boolean heartbeat = false;
		
		ISensor sensor;
		if(heartbeat)
			sensor = new Heartbeat();
		else
			sensor = new Ping();

		sensor.connect();
		((Thread) sensor).start();

		Thread.sleep(8000);

		sensor.killSensor();

		Thread.sleep(10000);

		sensor.killSensor();
	}
}
